package cn.mazexal.examapi.common.models;

/**
 * @author: Mazexal
 * Date: 2025/5/11
 */

public class EmptyResponse extends Response {
    private static final long serialVersionUID = 1L;

    public EmptyResponse() {
    }

    public static EmptyResponse success() {
        EmptyResponse response = new EmptyResponse();
        response.setSuccess(true);
        return response;
    }

    public static EmptyResponse error(String code, String message) {
        EmptyResponse response = new EmptyResponse();
        response.setErrCode(code);
        response.setErrMessage(message);
        return response;
    }

    public static EmptyResponse error(ResponseError error) {
        return error(error.getCode(), error.getMessage());
    }
}

